const api = require('./api') //postRequest 无需验证token  PostRequest 需要验证token
// 推荐位
export const position = {
	content: {
		detail(data, fun) {
			return api.postRequest("/api/position.content/detail", data, fun)
		},
	},
}
// 文章
export const article = {
	lists(data, fun) {
		return api.postRequest("/api/article/lists", data, fun)
	},
	detail(data, fun) {
		return api.postRequest("/api/article/detail", data, fun)
	},
	channel: {
		lists(data, fun) {
			return api.postRequest("/api/article.channel/lists", data, fun)
		},
		detail(data, fun) {
			return api.postRequest("/api/article.channel/detail", data, fun)
		},
	},
}
// 场馆预约日期列表
export const venue = {
	bookDateList(data, fun) {
		return api.postRequest('/api/venue/bookDateList', data, fun)
	},
	lists(data, fun) {
		return api.postRequest('/api/venue/lists', data, fun)
	},
	detail(data, fun) {
		return api.postRequest('/api/venue/detail', data, fun)
	},
	period:{
		lists(data, fun) {
			return api.postRequest('/api/venue.period/lists', data, fun)
		},
	},
	order:{
		submit(data, fun) {
			return api.PostRequest('/api/venue.order/submit', data, fun)
		},
		myList(data, fun) {
			return api.PostRequest('/api/venue.order/myList', data, fun)
		},
	}

}
// 用户信息
export const user = {
	register(data, fun) {
		return api.postRequest('/api/user/register', data, fun)
	},
	login(data, fun) {
		return api.postRequest('/api/user/login', data, fun)
	},
	detail(data, fun) {
		return api.postRequest('/api/user/detail', data, fun)
	},
	detailS(data, fun) {
		return api.PostRequest('/api/user/detail', data, fun)
	},
	editInfo(data, fun) {
		return api.PostRequest('/api/user/editInfo', data, fun)
	},
}
// 微信登陆
export const wxapp = {
	bindUser(data, fun) {
		return api.postRequest('/api/wxapp/bindUser', data, fun)
	},
	unbindUser(data, fun) {
		return api.postRequest('/api/wxapp/unbindUser', data, fun)
	},
	login(data, fun) {
		return api.postRequest('/api/wxapp/login', data, fun)
	},
}
// 发送注册短信接口
export const sms = {
	sendRegisterCode(data, fun) {
		return api.postRequest('/api/sms/sendRegisterCode', data, fun)
	}
}
// 公共
export const common = {
	captcha(data, fun) {
		return api.postRequest('/api/common/captcha', data, fun)
	}
}
export const dict = {
	dataAll(data, fun) {
		return api.postRequest('/api/dict.data/all', data, fun)
	}
}
// 管理端
export const manager = {
	login(data, fun) {
		return api.postRequest('/manager/admin/login', data, fun)
	},
	detail(data, fun) {
		return api.PostRequest2('/manager/admin/detail', data, fun)
	},
	wxapp:{
		login(data, fun) {
			return api.postRequest('/manager/wxapp/login', data, fun)
		},
		bindUser(data, fun) {
			return api.PostRequest2('/manager/wxapp/bindUser', data, fun)
		},
		unbindUser(data, fun) {
			return api.PostRequest2('/manager/wxapp/unbindUser', data, fun)
		}
	},
	order:{
		verification(data, fun) {
			return api.PostRequest2('/manager/venue.order/verification', data, fun)
		},
		myList(data, fun) {
			return api.PostRequest2('/manager/venue.order/myList', data, fun)
		},
		detail(data, fun) {
			return api.PostRequest2('/manager/venue.order/detail', data, fun)
		}
	}
	
}
